package cn.cdqf.coupon.dispatch.client;

import cn.cdqf.globle.common.ResultResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("KJXZ-MANAGER")
public interface CouponTemplateControllerApi {
    //根据商家id以及 等级 取出一个模板id
    @GetMapping(value="couponTemplate/{merchantId}/{level}",produces="application/json;charset=utf-8")
    public ResultResponse getCouponTemplateMapByMAndLevel(
            @PathVariable("merchantId") String merchantId,
            @PathVariable("level") Integer level
    );
    //produces定义返回值 为json  consumes="application/json;charset=utf-8":传递参数为json的时候
    @PatchMapping  (value = "couponTemplate/{couponId}/{count}",produces="application/json;charset=utf-8" )
    public ResultResponse decrByCouponId(@PathVariable("couponId") String couponId,
                                         @PathVariable("count") Integer count
    );
}
